<%@page contentType="text/html;charset=utf-8" pageEncoding="utf-8"%>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="cache-control" content="max-age=60">
<!--[if lt IE 9]> <div style='border: 1px solid #F7941D; background: #FEEFDA; text-align: center; clear: both; height: 78px; position: relative;'> <div style='position: absolute; right: 3px; top: 3px; font-family: courier new; font-weight: bold;'> <a href='#' onclick='javascript:this.parentNode.parentNode.style.display="none"; return false;'>
    <img src='/res/gh/images/ie6nomore-cornerx.jpg' style='border: none;' alt='Close this notice'/></a> </div> <div style='width: 640px; margin: 0 auto; text-align: left; padding: 0; overflow: hidden; color: black;'> <div style='width: 75px; float: left;'>
    <img src='/res/gh/images/ie6nomore-warning.jpg' alt='Warning!'/></div> <div style='width: 275px; float: left; font-family: Arial, sans-serif;'> <div style='font-size: 14px; font-weight: bold; margin-top: 12px;'>您正在使用已经过时IE浏览器！</div> <div style='font-size: 12px; margin-top: 6px; line-height: 16px;'>由于IE的安全问题以及对互联网标准的支持问题，建议您升级您的浏览器，以达到更好的浏览效果！</div> </div> <div style=' margin-left:10px; width: 85px; float: left;'><a href='http://www.firefox.com' target='_blank'>
    <img src='/res/gh/images/firefox.png' style='border: none;' alt='获得最新版的Firefox'/></a></div> <div style='width: 85px; float: left;'><a href=http://windows.microsoft.com/zh-CN/internet-explorer/products/ie/home' target='_blank'>
    <img src='/res/gh/images/ie9.png' style='border: none;' alt='下载 Internet Explorer 9'/></a></div> <div style='float: left;'><a href='http://www.google.com/chrome' target='_blank'>
    <img src='/res/gh/images/chrome.png' style='border: none;' alt='下载Google Chrome'/></a></div> </div> </div> <![endif]-->
<title>宇宙为何如此之大，而我们却在为鸡毛蒜皮忙活。</title>
<link rel="shortcut icon" href="favicon.ico" />
<link href="./res/css/login.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="./res/js/jquery-1.11.1.min.js"></script>
<script type="text/javascript" src="./res/js/login.js"></script>
<script type="text/javascript">
<%
   request.setAttribute("dt", new java.util.Date().getTime());
%>
i=0;
$(document).ready(function(){
  $("#uloginid").keypress(function(ke){
	    if(ke.which==13){
	   	  $("#upwd").focus();
	     }
  });
  $("#upwd").keypress(function(ke){
	    if(ke.which==13){
	   	  $("#vcode").focus();
	     }
  });
  $("#vcode").keypress(function(ke){
      if(ke.which==13){
    	  $("#loginBtn").click();
      }
  });
  $("#loginBtn").click(function(){
	  onLoginBtn();
  });
  $("#resetBtn").click(function(){
      $("#uloginid").text ='';
      $("#upwd").text ='';
      $("#vcode").text ='';
  });
  $("#vCodeImg").click(function(){
	  getNewVCode();
  });
  $("#uloginid").focus();
  onLoginBtn = function(){
		var loginId =$('#uloginid').val();
		var pwd = $('#upwd').val();
		var vcode =$('#vcode').val();;
		$.post(
			'../bmc-core/user/login?_dt='+new Date().getTime(),
			{
				uid_: loginId,
	            pwd: MD5(pwd),
				verify_code: vcode
			},
			function(data, status) {
				if(data.success){
					window.location.href = "../"+data.data;
				}else{
					alert(data.message);
				}
			}
		);
	};
  getNewVCode =function(){
		var vcode_img=document.getElementById('vCodeImg');
		if(vcode_img){
			vcode_img.src='../bmc-core/app/geVerifyCode?_dt='+new Date().getTime();
		}
		return false;
  };
});
</script>
</head>
<body>
<div id="page_bg">
<div class="to"></div>
<div id="page">
 <div id="login">
      <form>
        <p class="te">
          <label>用户名：</label>
          <input type="text" class="text" id="uloginid" />
        </p>
        <p class="te">
          <label>密&nbsp;码：</label>
          <input type="password" class="text" id ="upwd"/>
         </p>
        <p class="y">
          <label>验证码：</label>
          <input type="text" class="yz" id="vcode" />
          <a href="#" title="如看不清楚,请点击图片更换" onclick="return getNewVCode();" style="padding-left:0px">
                <img id="vCodeImg"  src="../bmc-core/app/geVerifyCode?_dt=${dt}"  width="70" height="25"  onclick="return getNewVCode();"  />
          </a>
        </p>
        <p style="padding-left:30px">
          <input type="button" value="登录" class="btn" id="loginBtn" />
          <input  class="btn" type="reset" id="resetBtn" value="重置" />
        </p>
      </form>
    </div>
</div>
<div class="bo"></div>
</div>
<script type="text/javascript" src="static/ext-5.1.0/ext-all.js" ></script>
<script type="text/javascript" src="static/bmc/bmc-all.js"></script>
</body>
</html>